package com.assignwork.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @ClassName WorkArrangeOther
 * @Description 作业配工其他
 * @Author dujianyu
 * @Date 2023/12/8 15:11
 */
@Data
@TableName("work_arrange_other")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "WorkArrangeOther对象", description = "作业配工其他")
public class WorkArrangeOther extends TenantEntity {

    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    @ApiModelProperty(value = "计划日期")
    private LocalDate planDate;

    @ApiModelProperty(value = "时间段")
    private String timeSpace;

    @ApiModelProperty(value = "作业类型")
    private String otherWorkType;

    @ApiModelProperty(value = "作业说明")
    private String workInfo;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "作业区域")
    private Long area;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "作业位置")
    private Long position;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "工人信息")
    private String workerInfo;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "机械类型")
    private String machineKind;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "机械单位")
    private String machineCorp;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "机械数量")
    private Integer machineCount;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "货名")
    private String cargoType;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "作业吨")
    private BigDecimal workTon;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "机械信息")
    private String machineInfo;
}
